﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HammerMUD.Commands;
using HammerMUD.Rooms;

namespace HammerMUD.Admin
{
    public class GotoCommand : Command
    {
        public GotoCommand()
        {
            Name = "goto";
            Help = "goto <room number>";
            SecurityLevel = SecurityLevel.Admin;
        }

        public override void Do(HammerMUD.System.User from, List<string> arguments)
        {
            if (arguments.Count == 1)
            {
                from.Send(Help);
                return;
            }

            from.UserAccount.CurrentCharacter.Move(RoomUtilities.FindRoom(Int64.Parse(arguments[1])));
            LookCommand.DoLook(from);
        }
    }
}
